package com.wtgroup.demo.mianshi.容器;

import java.util.concurrent.CopyOnWriteArrayList;

/**
 * @author nisus
 * @version 0.1
 * @since 2023/6/8 16:32
 */
public class D_CopyOnWriteList {

    public static void main(String[] args) {

        CopyOnWriteArrayList<Integer> list = new CopyOnWriteArrayList<>();
        // 复制一份原数组内容, 并扩容增加了 1 个位置
        list.add(2);
        System.out.println(list.get(0));
    }

}
